// 账单相关类型定义

// 菜品信息接口
export interface FoodItem {
    id: string | number
    name: string
    money: number | string
    price?: number | string  // 单价（新增）
    num: number | string
    desk_num?: number | string
    total_money: number | string
    member_price?: number | string  // 会员价
    is_vip?: number | string  // 是否会员价 1是0否
    is_discount?: number | string  // 是否打折 1是0否
    groupInfo?: FoodItem[]
    group_info?: FoodItem[]
    notes?: string[]
    sku_id?: string | number
}

// 用户信息接口
export interface UserInfo {
    real_name?: string
    grade_name?: string
    user_id?: string
    points?: number | string
    balance?: number | string
}

// 订单详情接口
export interface OrderDetail {
    ticket_id?: string
    detail?: {
        printNum?: number
        deskList?: Array<{
            name: string
            use_num: number
        }>
        priceInfo?: {
            feastMoney?: number | string
            openNum?: number | string
            allFeastMoney?: number | string
            originMoney?: number | string
            payMoney?: number | string
            foodNum?: number | string
            real_pay_money?: number | string
            is_vip?: number | string
            backNum?: number | string
            backMoney?: number | string
            presentNum?: number | string
            presentMoney?: number | string
            memberSubMoney?: number | string
            point?: number | string
            pointMoney?: number | string
            reduceMoney?: number | string
            discountMoney?: number | string
            serviceMoney?: number | string
        }
        foodList?: FoodItem[]
        feast_food_list?: FoodItem[]
        back_list?: FoodItem[]
        shopInfo?: {
            shop_name?: string
            phone?: string
            address?: string
        }
        clerkName?: string
    }
    create_time?: string
}

// 时间信息接口
export interface TimeInfo {
    timeSlotList?: {
        print?: {
            time?: string
            slot?: string
        }
        start?: {
            time?: string
            slot?: string
        }
        order_pay_time?: {
            time?: string
            slot?: string
        }
    }
}

// 支付信息接口
export interface PayInfo {
    name: string
    amount?: number | string
    money?: number | string
    type?: number | string  // 1-企业挂账，其他-个人挂账
    org_name?: string  // 担保人/企业名称
    account_name?: string  // 企业账户/挂账账户
    hangMoney?: number | string
    used?: number | string  // 账户累计挂账金额
    balance?: number | string  // 剩余信用额度
}

// 优惠券信息接口
export interface CouponInfo {
    name?: string
    amount?: number | string
    money?: number | string
}

// API 响应接口
export interface ApiResponse<T = any> {
    code: number
    message: string
    data?: T
    status: number
}

// 桌面信息接口
export interface DesktopInfo {
    id: string | number
    name?: string
    isChecked?: boolean
    desk_name?: string
    region_name?: string
    use_num?: number
    order_no?: string
    open_num?: number
    record_price?: number | string
    clerk_name?: string
}
